@extends('layout.default')

@section('layout.content')

  <div class="row">
    <div class="col-xs-6">
      <div class="print-block">
        <div class="print-qrcode">
          {!! QrCode::errorCorrection('H')->size(90)->margin(0)->generate($user->dwz); !!}
        </div>
        <div class="print-item">
          <table class="qrcode-print">
            <tr>
              <td class="qrcode-td1">帐号：</td>
              <td class="qrcode-td2">{{$user->account}}</td>
            </tr>
            <tr>
              <td class="qrcode-td1">姓名：</td>
              <td class="qrcode-td2">{{$user->name}}</td>
            </tr>
            <tr>
              <td class="qrcode-td1">手机：</td>
              <td class="qrcode-td2">{{ $user->mobile }}</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <div class="col-xs-6">

      <a class="btn btn-xs btn-pink no-border" onclick="a()">
        <i class="ace-icon fa fa-print"></i>
        打印
      </a>
    </div>
  </div>


@stop

@section('javascript')

  <script src="/assets/js/jquery.jqprint-0.3.js"></script>
  <script src="/assets/js/jquery-migrate-1.1.0.min.js"></script>
  <script type="text/javascript">

      function a() {
          $(".print-block").jqprint({
              debug: false,
              importCSS: true,
              printContainer: true,
              operaSupport: false
          });
      }


  </script>
@stop